package com.six.work.servicesImpl;

import com.six.work.entity.Admin;
import com.six.work.entity.Applicant;
import com.six.work.entity.CompanyAndPositionView;
import com.six.work.entity.Resume;
import com.six.work.mapper.ResumeMapper;
import com.six.work.services.ResumeServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ResumeServicesImpl implements ResumeServices {
    @Autowired
    private ResumeMapper resumeMapper;


    @Override
    public List<CompanyAndPositionView> findAllResumeByComID(Integer company_id) {
        List<CompanyAndPositionView> list = resumeMapper.findAllResumeByComID(company_id);
        return list;
    }

    @Override
    public List<CompanyAndPositionView> findResByUniversity(String resume_university, Integer company_id) {
       List<CompanyAndPositionView> list = resumeMapper.findResByUniversity(resume_university,company_id);
        return list;
    }

    @Override
    public List<CompanyAndPositionView> findResBySkill(String resume_skill,Integer company_id) {
       List<CompanyAndPositionView> list = resumeMapper.findResBySkill(resume_skill,company_id);
        return list;
    }

    @Override
    public List<CompanyAndPositionView> findResByExp(String resume_experience, Integer company_id) {
        List<CompanyAndPositionView> list = resumeMapper.findResByExp(resume_experience,company_id);
        return list;
    }


    @Override    //增加
    public Integer insertResume(Resume resume) {
        return resumeMapper.insertResume(resume);
    }

    @Override
    public Integer updateResume(Resume resume) {
        return resumeMapper.updateResume(resume);
    }



    @Override
    public Resume SelectResumeByID(Integer applicant_id) {
        return resumeMapper.SelectResumeByID(applicant_id);
    }

    //前端页面talent传值到postItemC
    @Override
    public List<Resume> SelectResByID(Integer resume_id) {
        return resumeMapper.SelectResByID(resume_id);
    }


    //求职者查看公司职位信息然后投递简历
    @Override
    public List<Resume> findAllResumeByAppID(Integer applicant_id) {
        List <Resume> list = resumeMapper.findAllResumeByAppID(applicant_id);
        return list;
    }


}
